<template>
	<view class="container">
		<!--tui-skeleton v-if="skeletonShow" :isLoading="false" backgroundColor="#fafafa" borderRadius="10rpx"></tui-skeleton-->
		<view class="tui-login-tip" v-if="!isLogin">
			<button type="default" class='tui-login-btn' @tap='doLogin'>
				<view class="tui-login-btn-inner">
					登录
				</view>
				<text class='tui-login-btn-text'>登录后可查看购物车</text>
			</button>
		</view>
		<!-- #ifdef MP || H5-->
		<view class="tui-edit-goods">
			<view class="tui-skeleton-fillet">购物车共<text class="tui-goods-num">{{ goodsList.length }}</text>件商品</view>
			<view v-if="goodsList.length!=0">
				<tui-button type="gray" class="tui-skeleton-fillet" :plain="true" shape="circle" width="160rpx" height="60rpx" :size="24" @click="editGoods">{{isEdit?"完成":"编辑商品"}}</tui-button>
			</view>
		</view>
		<!-- #endif -->
		<checkbox-group v-if="goodsList.length!=0" @change="buyChange">
			<view class="tui-cart-cell  tui-mtop" v-for="(item, index) in goodsList" :key="index">
				<!-- <view class="tui-activity" v-if="index%2==0">
					<view class="tui-bold">满3件享受优惠</view>
					<view class="tui-buy">去凑单<tui-icon name="arrowright" :size="18" color="#333"></tui-icon>
					</view>
				</view> -->
				<tui-swipe-action :actions="actions" forbid @click="HANDLE_SORRY" :params="item">
					<template v-slot:content>
						<view class="tui-goods-item">
							<label class="tui-checkbox">
								<checkbox :value="item.productItemId" :checked="item.selected" class="tui-skeleton-fillet" color="#fff"></checkbox>
								<!-- <checkbox :value="item.id" @click="goodCheckChange($event,index)" :checked="item.selected" color="#fff"></checkbox> -->
							</label>
							<image :src="item.productPic" class="tui-goods-img tui-skeleton-fillet" />
							<view class="tui-goods-info">
								<view class="tui-goods-title tui-skeleton-fillet">{{ item.productName }}</view>
								<view class="tui-goods-model">
                                    <!-- <view v-for="spec in row.specDTOs" :key="spec.id" class="spec">{{`${spec.specName}:${spec.properties[0].propertyName}`}}</view> -->
									<view class="tui-model-text tui-skeleton-fillet">
                                        <!-- {{index%2==0?"440ml;10件;套装":"500ml;2支"}} -->
                                        <!-- <span v-for="spec in item.productSpec" :key="spec.speciPropertyId">{{ spec.propertyName }}</span> -->
										<span>{{item.productSpec ? item.productSpec.map(d => d.propertyName).join(', ') : ''}}</span>
                                    </view>
									<!-- <tui-icon name="arrowdown" :size="16" color="#333"></tui-icon> -->
								</view>
								<view class="tui-price-box">
									<view class="tui-goods-price tui-skeleton-fillet">￥{{ item.productPrice | getPrice}}</view>
									<view class="tui-scale tui-skeleton-fillet">
										<tui-numberbox :value="item.productNum" :height="40" :width="74" :min="1" :index="index" @change="changeNum($event,item)"></tui-numberbox>
									</view>
								</view>
							</view>
						</view>
					</template>
				</tui-swipe-action>
				<!-- <view class="tui-sub-info" v-if="index%2==0">赠品：柔色尽情丝柔口红唇膏1支柔色尽情丝柔口红唇膏1支</view> -->
			</view>
		</checkbox-group>
		
		
		<view class="mt20 tui-skeleton-fillet" v-else>
			<tui-no-data :fixed="false" imgUrl="https://cwmall.oss-cn-shanghai.aliyuncs.com/mp-icon/img_noorder_3x.png">您还未添加任何商品到购物车哦～</tui-no-data>
		</view>

		<!--商品失效-->
		<!-- <view class="tui-cart-cell  tui-mtop">
			<view class="tui-activity">
				<view class="tui-bold">失效商品</view>
				<view class="tui-buy">
					<tui-button type="gray" :plain="true" shape="circle" width="200rpx" height="56rpx" :size="24">清空失效商品</tui-button>
				</view>
			</view>
			<view :class="{'tui-invalid-ptop':index!==0}" v-for="(item,index) in 2" :key="index">
				<tui-swipe-action :actions="actions2">
					<template v-slot:content>
						<view class="tui-goods-item">
							<view class="tui-checkbox tui-invalid-pr">
								<view class="tui-invalid-text">失效</view>
							</view>
							<image src="/static/images/mall/product/4.jpg" class="tui-goods-img opcity" />
							<view class="tui-goods-info">
								<view class="tui-goods-title tui-gray">
									欧莱雅（LOREAL）奇焕光彩粉嫩透亮修颜霜彩粉嫩透亮修颜霜透亮修颜霜透亮修颜霜
								</view>
								<view class="tui-price-box tui-flex-center">
									<view class="tui-goods-invalid">产品失效</view>
									<view class="tui-btn-alike">
										<tui-button type="white" :plain="true" shape="circle" width="120rpx" height="48rpx" :size="24">找相似</tui-button>
									</view>
								</view>
							</view>
						</view>
					</template>
				</tui-swipe-action>
			</view>
		</view> -->

		<!--猜你喜欢-->

		<tui-divider :size="28" :bold="true" color="#333" width="50%">
			<tui-icon name="like" :size="18" color="#e41f19"></tui-icon>
			<text class="tui-youlike tui-skeleton-fillet">猜你喜欢</text>
		</tui-divider>
        <view class="tui-product-list">
            <view class="tui-product-container">
                <block v-for="(item, index) in PRODUCTS_LIST" :key="index" v-if="(index + 1) % 2 != 0">
                    <!--商品列表-->
                    <view class="tui-pro-item" hover-class="hover" :hover-start-time="150" @tap="GOODS_DETAIL(item)">
                        <image :src="item.pic" class="tui-pro-img tui-skeleton-rect" mode="widthFix" />
                        <view class="tui-pro-content">
                            <view class="tui-pro-tit tui-skeleton-rect">{{ item.productName }}</view>
                            <view>
                                <view class="tui-pro-price">
                                    <text class="tui-sale-price tui-skeleton-rect">￥{{ item.soldPrice || 0 }}</text>
                                    <text class="tui-factory-price tui-skeleton-rect">￥{{ item.price }}</text>
                                </view>
                                <view class="tui-pro-pay tui-skeleton-rect">{{ item.soldStock }}人付款</view>
                            </view>
                        </view>
                    </view>
                    <!--商品列表-->
                    <!-- <template is="productItem" data="{{item,index:index}}" /> -->
                </block>
            </view>
            <view class="tui-product-container">
                <block v-for="(item, index) in PRODUCTS_LIST" :key="index" v-if="(index + 1) % 2 == 0">
                    <!--商品列表-->
                    <view class="tui-pro-item" hover-class="hover" :hover-start-time="150" @tap="GOODS_DETAIL(item)">
                        <image :src="item.pic" class="tui-pro-img tui-skeleton-rect" mode="widthFix" />
                        <view class="tui-pro-content">
                            <view class="tui-pro-tit tui-skeleton-rect">{{ item.productName }}</view>
                            <view>
                                <view class="tui-pro-price">
                                    <text class="tui-sale-price tui-skeleton-rect">￥{{ item.soldPrice || 0 }}</text>
                                    <text class="tui-factory-price tui-skeleton-rect">￥{{ item.price }}</text>
                                </view>
                                <view class="tui-pro-pay tui-skeleton-rect">{{ item.soldStock }}人付款</view>
                            </view>
                        </view>
                    </view>
                    <!--商品列表-->
                    <!-- <template is="productItem" data="{{item,index:index}}" /> -->
                </block>
            </view>
        </view>

		<!--tabbar-->
		<view class="tui-tabbar-action">
			<view class="tui-checkAll">
				<checkbox-group @change="checkAll">
					<label class="tui-checkbox">
						<checkbox :checked="isAll" color="#fff"></checkbox>
						<text class="tui-checkbox-pl">全选</text>
					</label>
				</checkbox-group>
				<view class="tui-total-price" v-if="!isEdit">合计:<text class="tui-bold">￥{{totalPrice | getPrice}}</text> </view>
			</view>
			<view>
				<tui-button width="200rpx" height="70rpx" :size="30" type="danger" shape="circle" v-if="!isEdit" @click="btnPay">去结算({{buyNum}})</tui-button>
				<tui-button width="200rpx" height="70rpx" :size="30" type="danger" shape="circle" :plain="true" @click="handleDel" v-else>删除</tui-button>
			</view>
		</view>
		<!--加载loadding-->
		<tui-loadmore v-if="loadding" :index="3" type="red"></tui-loadmore>
		
		
		<!-- 联系客服 -->
		<tui-customer :bottom="120"></tui-customer>
		
		<custom-tab-bar name='cart'></custom-tab-bar>
	</view>
</template>

<script>
    import { PRODUCTS_LIST } from "../../mixin/PRODUCTS_LIST"
    import { PRODUCTS_DETAIL } from "../../mixin/PRODUCTS_DETAIL"
	import CustomTabBar from "@/components/common/custom-tabbar/custom-tabbar.vue"
	export default {
		components: {
			CustomTabBar
		},
		data() {
			return {
				// dataList: [{
				// 	id: "t2020003120",
				// 	buyNum: 2,
				// 	price: 299.5,
				// 	selected: false
				// }, {
				// 	id: 't1020003120',
				// 	buyNum: 1,
				// 	price: 499,
				// 	selected: false
				// }],
				skeletonShow: true,
				isAll: false,
				totalPrice: 0,
				buyNum: 0,
				cartIds: [], //购物车id
				actions: [{
						name: '收藏',
						width: 64,
						color: '#fff',
						fontsize: 28,
						background: '#FFC600'
					},
					{
						name: '看相似',
						color: '#fff',
						fontsize: 28,
						width: 64,
						background: '#FF7035'
					},
					{
						name: '删除',
						color: '#fff',
						fontsize: 28,
						width: 64,
						background: '#F82400'
					}
				],
				actions2: [{
						name: '看相似',
						color: '#fff',
						fontsize: 28,
						width: 64,
						background: '#FF7035'
					},
					{
						name: '删除',
						color: '#fff',
						fontsize: 28,
						width: 64,
						background: '#F82400'
					}
				],
				isEdit: false,
				productList: [],
				pageIndex: 1,
				loadding: false,
                pullUpOn: true,
                goodsList: [],      // 购物车列表
			}
        },
        mixins: [PRODUCTS_LIST, PRODUCTS_DETAIL],
		computed: {
			isLogin() {
				return this.$store.getters.isLogin
			}
		},
        onLoad(){
            this.init()
        },
		onShow(){
			// this.init()
			this.isEdit = false
			if(this.$store.state.customerId && this.isLogin){
				this.GetCartList()
			} else {
				this.goodsList = []
			}
		},
		filters: {
			getPrice(price) {
				price = price || 0;
				return price.toFixed(2)
			}
		},
		methods: {
            init(){
                // this.GetCartList()
                this.GetProductListByHome((data)=>{
					setTimeout(()=>{
                        this.skeletonShow = false
                        this.PRODUCTS_LIST = []
						this.PRODUCTS_LIST = data
					},500)
				})
            },
            async GetCartList(){
                let { data } = await this.$api.GetCartList()
                data.map(row=>{
                    row.selected = false
					row.productSpec = JSON.parse(row.productSpec)
                })
                this.goodsList = data
                // console.log(this.goodsList)
            },
            // 删除
            async handleDel(){
                // console.log(this.goodsList)
                let cardGoodsIds = []
                this.goodsList.map(item=>{
                    if(item.selected){
                        cardGoodsIds.push(item.id)
                    }
                })

                await this.$api.DelCartList({
                    ids: cardGoodsIds
                })

                await this.GetCartList()
                setTimeout(()=>{
                    this.calcHandle()
                })
                uni.showToast({ title: "删除成功" })

            },
			calcHandle() {
				let buyNum = 0;
				let totalPrice = 0;
				let selectedNum = 0;
				this.goodsList.map((item) => {
					if (item.selected) {
						buyNum += item.productNum;
						totalPrice += item.productPrice * item.productNum;
						selectedNum++
					}
				})
				this.isAll = selectedNum === this.goodsList.length
				this.buyNum = buyNum
                this.totalPrice = totalPrice
			},
			async changeNum(e, row){
                // debugger
                // this.goodsList[e.index].num = e.value
                let { productId, productItemId } = row

                // let productSpecis = []

                // 收集已经选择的规格
                // Array.isArray(specDTOs) && specDTOs.forEach(item=>{
                //     let { properties } = item
                //     properties.map(info=>{
                //         productSpecis.push(info.id)
                //     })
                // })
				await this.$api.SetCartList({
					num: e.value,
					productId,
					productItemId,
					customerId: this.$store.state.customerId,
					type: 2
				})
				
				row.productNum = e.value

                // this.GetCartList()
			},
			handlerButton: function(e) {
				let index = e.index;
				let item = e.item;
				this.tui.toast(`商品id：${item.id}，按钮index：${index}`);
			},
			editGoods: function() {
				// #ifdef H5 || MP
				this.isEdit = !this.isEdit;
				// #endif
			},
			detail: function() {
				uni.navigateTo({
					url: '/pagesB/productDetail/productDetail'
				})
			},
			async btnPay() {
                // 这里需要创建订单
                let customerId = this.$store.state.customerId
                let merchantId = this.$store.state.merchantId

                // 商品信息
                let { goodsList } = this.$data
                goodsList = JSON.parse(JSON.stringify(goodsList))
                if(goodsList.filter(item => item.selected).length == 0){
                    uni.showToast({
                    	title:'请选择结算的商品',
						icon:'none'
                    })
                    return
                }

                let formatGoodsDetail = []

                // Array.isArray(goodsList) && goodsList.map(item=>{
                //     let { productDTO } = item
                //     productDTO.properties = item.specDTOs
                //     // 商品件数
                //     productDTO.productNum = item.num
                //     // 价格
                //     productDTO.productPrice = productDTO.price
                //     // 用户选择的规格
                //     productDTO.specPropertyIds = productDTO.specs
                //     if(item.selected){
                //         formatGoodsDetail.push(productDTO)
                //     }
                // })
				
				Array.isArray(goodsList) && goodsList.map(item => {
					item.selected && formatGoodsDetail.push({
						pic: item.productPic,
						productName: item.productName,
						productNum: item.productNum,
						price: item.productPrice || 0,
						subProduct: {
							id: item.productItemId,
							productItemSpecDTOS: item.productSpec
						}
					})
				})
				
                this.$store.dispatch('ADD_BUYLIST', formatGoodsDetail)
                uni.navigateTo({
                    url: `/pagesB/submitOrder/submitOrder`
                })
			},
			buyChange(e) {
				this.cartIds = e.detail.value;
				this.goodsList.map(item => {
                    let cardGoodsId = item.productItemId.toString()
                    //如果购物车id为数字统一转成字符串
					if (~this.cartIds.indexOf(cardGoodsId)) {
						item.selected = true
					} else {
						item.selected = false
					}
                })
                
				setTimeout(() => {
					this.calcHandle()
				}, 0)
            },
            // 全选
			checkAll(e) {
                let len = this.goodsList.length
                let arr = []
                for(let i=0;i<len;i++){
                    this.goodsList[i].selected = this.isAll ? false : true
                    arr.push(this.goodsList[i].cardGoodsId)
                }
                this.selectedList = this.isAll ? [] : arr
                this.isAll = (this.isAll || this.goodsList.length == 0) ? false : true
                this.calcHandle()
            },
            // 合计
            // sum(e,index){
            //     this.totalPrice=0;
            //     let len = this.goodsList.length;
            //     for(let i=0;i<len;i++){
            //         if(this.goodsList[i].selected) {
            //             if(e && i==index){
            //                 this.totalPrice = this.totalPrice + (e.detail.value*this.goodsList[i].productDTO.price);
            //             }else{
            //                 this.totalPrice = this.totalPrice + (this.goodsList[i].num*this.goodsList[i].productDTO.price);
            //             }
            //         }
            //     }
            //     this.totalPrice = this.totalPrice
            // },
			doLogin() {
				this.$store.dispatch("USER_LOGIN", {
					callBack: () => {
						this.isEdit = false
						if(this.$store.state.customerId){
							this.GetCartList()
						}
					}
				})
			}
		},
		onPullDownRefresh() {
			setTimeout(() => {
				uni.stopPullDownRefresh()
			}, 200)
		},
		onPullDownRefresh: function() {
			let loadData = JSON.parse(JSON.stringify(this.productList));
			loadData = loadData.splice(0, 10)
			this.productList = loadData;
			this.pageIndex = 1;
			this.pullUpOn = true;
			this.loadding = false
			uni.stopPullDownRefresh()
		},
		onReachBottom: function() {
			if (!this.pullUpOn) return;
			this.loadding = true;
			if (this.pageIndex == 4) {
				this.loadding = false;
				this.pullUpOn = false
			} else {
				let loadData = JSON.parse(JSON.stringify(this.productList));
				loadData = loadData.splice(0, 10)
				if (this.pageIndex == 1) {
					loadData = loadData.reverse();
				}
				this.productList = this.productList.concat(loadData);
				this.pageIndex = this.pageIndex + 1;
				this.loadding = false
			}
		},
		onNavigationBarButtonTap(e) {
			this.isEdit = !this.isEdit;
			let text = this.isEdit ? "完成" : "编辑";
			// #ifdef APP-PLUS
			let webView = this.$mp.page.$getAppWebview();
			webView.setTitleNViewButtonStyle(0, {
				text: text
			});
			// #endif
		}
	}
</script>

<style>
	.container {
		padding-bottom: 120rpx;
	}
	
	.tui-login-tip {
		border-bottom: 1px solid #eee;
	}
	
	.tui-login-btn {
		padding: 12rpx 40rpx;
		display: flex;
		align-items: center;
	}
	
	.tui-login-btn-inner {
		width: 120rpx;
		font-size: 24rpx;
		height: 48rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 24rpx;
		background: #eb0909;
		color: #fff;
	}
	
	.tui-login-btn-text {
		color: #b1b1b1;
		font-size: 24rpx;
		padding-left: 20rpx;
	}

	.tui-mtop {
		margin-top: 24rpx;
	}

	.tui-edit-goods {
		width: 100%;
		border-radius: 12rpx;
		overflow: hidden;
		padding: 24rpx 30rpx 0 30rpx;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
		align-items: center;
		color: #333;
		font-size: 24rpx;
	}

	.tui-goods-num {
		font-weight: bold;
		color: #e41f19;
	}

	.tui-cart-cell {
		width: 100%;
		border-radius: 12rpx;
		background: #FFFFFF;
		padding: 40rpx 0;
		overflow: hidden;
	}

	.tui-goods-item {
		display: flex;
		padding: 0 30rpx;
		box-sizing: border-box;
	}

	.tui-checkbox {
		min-width: 70rpx;
		display: flex;
		align-items: center;
	}

	/* #ifdef MP-WEIXIN */
	.tui-checkbox .wx-checkbox-input {
		width: 40rpx;
		height: 40rpx;
		margin-right: 0 !important;
		border-radius: 50% !important;
		transform: scale(0.8);
		border-color: #d1d1d1 !important;
	}

	.tui-checkbox .wx-checkbox-input.wx-checkbox-input-checked {
		background: #eb0909;
		width: 44rpx !important;
		height: 44rpx !important;
		border: none;
	}

	/* #endif */
	/* #ifndef MP-WEIXIN */

	>>>.tui-checkbox .uni-checkbox-input {
		width: 40rpx;
		height: 40rpx;
		margin-right: 0 !important;
		border-radius: 50% !important;
		transform: scale(0.8);
		border-color: #d1d1d1 !important;
	}

	>>>.tui-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
		background: #eb0909;
		width: 45rpx !important;
		height: 45rpx !important;
		border: none;
	}

	/* #endif */
	.tui-goods-img {
		width: 220rpx;
		height: 220rpx !important;
		border-radius: 12rpx;
		flex-shrink: 0;
		display: block;
	}

	.tui-goods-info {
		width: 100%;
		padding-left: 20rpx;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: space-between;
		box-sizing: border-box;
		overflow: hidden;
	}

	.tui-goods-title {
		white-space: normal;
		word-break: break-all;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		font-size: 24rpx;
		color: #333;
	}

	.tui-goods-model {
		max-width: 100%;
		color: #333;
		background: #F5F5F5;
		border-radius: 40rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 16rpx;
		box-sizing: border-box;
	}

	.tui-model-text {
		max-width: 100%;
		transform: scale(0.9);
		transform-origin: 0 center;
		font-size: 24rpx;
		line-height: 32rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.tui-price-box {
		width: 100%;
		display: flex;
		align-items: flex-end;
		justify-content: space-between;
	}

	.tui-goods-price {
		font-size: 34rpx;
		font-weight: 500;
		color: #e41f19;
	}

	.tui-scale {
		transform: scale(0.8);
		transform-origin: 100% 100%;
	}

	.tui-activity {
		font-size: 24rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 30rpx 20rpx 100rpx;
		box-sizing: border-box;
	}

	.tui-buy {
		display: flex;
		align-items: center
	}

	.tui-bold {
		font-weight: bold;
	}

	.tui-sub-info {
		max-width: 532rpx;
		font-size: 24rpx;
		line-height: 24rpx;
		padding: 20rpx 30rpx 10rpx 30rpx;
		box-sizing: border-box;
		color: #333;
		transform: scale(0.8);
		transform-origin: 100% center;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		margin-left: auto
	}

	.tui-invalid-text {
		width: 66rpx;
		margin-right: 4rpx;
		text-align: center;
		font-size: 24rpx;
		color: #fff;
		background: rgba(0, 0, 0, .3);
		transform: scale(0.8);
		transform-origin: center center;
		border-radius: 4rpx;
		flex-shrink: 0;
	}

	.tui-gray {
		color: #B2B2B2 !important;
	}

	.tui-goods-invalid {
		color: #555;
		font-size: 24rpx;
	}

	.tui-flex-center {
		align-items: center !important;
	}

	.tui-invalid-ptop {
		padding-top: 40rpx;
	}

	.tui-tabbar-action {
		width: 100%;
		height: 100rpx;
		background: #fff;
		position: fixed;
		left: 0;
		/* bottom: 100rpx;*/
		bottom: calc(env(safe-area-inset-bottom) + 100rpx);
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 30rpx;
		box-sizing: border-box;
		font-size: 24rpx;
		z-index: 99999;
	}

	.tui-tabbar::before {
		content: '';
		width: 100%;
		border-top: 1rpx solid #d9d9d9;
		position: absolute;
		top: 0;
		left: 0;
		-webkit-transform: scaleY(0.5);
		transform: scaleY(0.5);
	}

	.tui-checkAll {
		display: flex;
		align-items: center;
	}

	.tui-checkbox-pl {
		padding-left: 12rpx;
	}

	.tui-total-price {
		padding-left: 30rpx;
		font-size: 30rpx !important;
	}

	/*猜你喜欢*/
	.tui-youlike {
		padding-left: 12rpx
	}

	.tui-product-list {
		display: flex;
		justify-content: space-between;
		flex-direction: row;
		flex-wrap: wrap;
		box-sizing: border-box;
		padding-bottom: calc(env(safe-area-inset-bottom) + 100rpx);
	}

	.tui-product-container {
		flex: 1;
		margin-right: 2%;
	}

	.tui-product-container:last-child {
		margin-right: 0;
	}

	.tui-pro-item {
		width: 100%;
		margin-bottom: 4%;
		background: #fff;
		box-sizing: border-box;
		border-radius: 12rpx;
		overflow: hidden;
	}

	.tui-pro-img {
		width: 100%;
		display: block;
	}

	.tui-pro-content {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		box-sizing: border-box;
		padding: 20rpx;
	}

	.tui-pro-tit {
		color: #2e2e2e;
		font-size: 26rpx;
		word-break: break-all;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.tui-pro-price {
		padding-top: 18rpx;
	}

	.tui-sale-price {
		font-size: 34rpx;
		font-weight: 500;
		color: #e41f19;
	}

	.tui-factory-price {
		font-size: 24rpx;
		color: #a0a0a0;
		text-decoration: line-through;
		padding-left: 12rpx;
	}

	.tui-pro-pay {
		padding-top: 10rpx;
		font-size: 24rpx;
		color: #656565;
	}
</style>
